﻿Imports DTO
Imports System.Linq

Public Class TinhTrangDAO

    Public Function getTinhTrang_DAO()
        Dim listtt As List(Of TinhTrangDTO) = New List(Of TinhTrangDTO)

        Dim context As DataproviderDataContext = New DataproviderDataContext()
        Dim list = From tinhtrang In context.TinhTrangs
                   Select tinhtrang

        For Each value As TinhTrang In list
            Dim entity As TinhTrangDTO = New TinhTrangDTO()
            entity.MaTT = value.MaTT
            entity.LoaiTT = value.LoaiTT

            listtt.Add(entity)
        Next

        Return listtt
    End Function

End Class
